#ifndef __SmileProfile_h__
#define __SmileProfile_h__

#define  Size 28000000
#define  NumberCharacter 34
#define  LENGTH_LINGO    4
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
class SmileProfile {

    private:

        char      *filename;
        int        numberSmiles;
        char     **smiles;
        int       *frecLingos;
        int       *posAfterOrderLingos;
        int        numberLingos;


    protected:

        int   LingosProfSmiles(int);
        void  ReduceLingo4(char*, const char*, const char*);
        void  ReduceLingo4Number(char*);
        void  CopyLingo(char *, char*, int, int);

    public:

        //Constructor and Destructor
        SmileProfile();
        ~SmileProfile();

        //Input Functions
        void    Filename(char *);
        void    NumberSmiles(int);
        void    Smiles(char **, int);
        void    FrecLingos(int *, int);
        void    PosAfterOrderLingos(int *, int);
        void    NumberLingos(int);

        //Output Functions
        char*   Filename(void);
        int     NumberSmiles(void);
        char*   Smiles(int);
        int     FrecLingos(int);
        int     PosAfterOrderLingos(int);
        int     NumberLingos(void);
        int     LingoLength(void);
        int     AlphabetSize(void);

        //Operations Funtions
        int     ExtractSmiles(void);
        int     CreateLingosProfile(void);
        int     CompactLingosProfile(void);
        int     ComputeLingo4Code(char*);
        char   *ComputeLingo4Code(int);

    };
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
class SimCluster {

    private:

        int 	x;
        int 	y;
        double	similarity;

    public:

        SimCluster(): x(0), y(0), similarity(0) {};
        SimCluster(int x_tmp, int y_tmp, double similarity_tmp): x(x_tmp), y(y_tmp), similarity(similarity_tmp) {};
        SimCluster(const SimCluster &SimCluster_tmp): x(SimCluster_tmp.x), y(SimCluster_tmp.y), similarity(SimCluster_tmp.similarity) {};
        ~SimCluster() {};

        inline void X(int x_tmp) { if (x_tmp > 0) x = x_tmp; };
        inline void Y(int y_tmp) { if (y_tmp > 0) y = y_tmp; };
        inline void Similarity(double similarity_tmp) { similarity = similarity_tmp; };

        inline int      X(void) { return x; };
        inline int 	Y(void) { return y; };
        inline double   Similarity(void) { return similarity; };

        inline SimCluster operator=(const SimCluster& SimCluster_tmp) { x = SimCluster_tmp.x; y = SimCluster_tmp.y; similarity = SimCluster_tmp.similarity; return *this; };

};
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
class IdxCluster {

    private:

        int position;
        int	idxValue;

    public:

        IdxCluster(): position(0), idxValue(0) {};
        IdxCluster(int position_tmp, int idxValue_tmp): position(position_tmp), idxValue(idxValue_tmp) {};
        IdxCluster(const IdxCluster &IdxCluster_tmp): position(IdxCluster_tmp.position), idxValue(IdxCluster_tmp.idxValue) {};
        ~IdxCluster() {};

        inline void Position(int position_tmp) { if (position_tmp > 0) position = position_tmp; };
        inline void IdxValue(int idxValue_tmp) { idxValue = idxValue_tmp; };

        inline int  Position(void) { return position; };
        inline int  IdxValue(void) { return idxValue; };

        inline IdxCluster operator=(const IdxCluster& IdxCluster_tmp) { position = IdxCluster_tmp.position; idxValue = IdxCluster_tmp.idxValue; return *this; };

};
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------------------------------------------------

